<template>
  <div class="header">
    <h1><img v-if="imgUrl" :src="imgUrl" alt="" class="img">{{ componentContent.title }}</h1>
  </div>
</template>

<script>
export default {
  data () {
    return {}
  },
  name: 'Search',
  computed: {
    imgUrl(){
      if(this.componentContent.bannerData && this.componentContent.bannerData.length>0 && this.componentContent.bannerData[0].pic){
        return this.componentContent.bannerData[0].pic
      }else{
        return ""
      }
    }
  },
  props: {
    componentContent: {
      type: Object
    }
  },
  methods: {}
}
</script>

<style lang="less" scoped>
.header {
  height: 45px;
  padding-top: 0px;
  background: rgb(196, 4, 20);
  h1 {
    font-size: 20px;
    line-height: 45px;
    font-family: PingFang SC;
    font-weight: 500;
    color: #fff;
    margin-left: 15px;
  }
  .img{
    width: 25px;
    height: 25px;
    margin-right: 10px;
    float: left;
    margin-top: 10px;
  }
}
</style>
